<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head lang="en">
    <meta charset="utf-8"/>
    <title>个人信息</title>
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
    <link th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
    <!-- bootstrap-table 表格插件样式 -->
    <link th:href="@{/ajax/libs/bootstrap-table/bootstrap-table.min.css}" rel="stylesheet"/>
    <link th:href="@{/project/css/public.css}" rel="stylesheet"/>
    <link th:href="@{/project/css/mygrxx.css}" rel="stylesheet"/>
    <link th:href="@{/project/css/ry-ui.css}" rel="stylesheet"/>
    <link th:href="@{/project/css/myorder.css}" rel="stylesheet"/>
    <link th:href="@{/project/css/proList.css}" rel="stylesheet"/>


</head>
<body>
<!------------------------------head------------------------------>
<div class="head" style="margin: 0;" th:include="include::normal_headDiv"></div>
<!------------------------------idea------------------------------>
<div class="address">
    <div class="wrapper clearfix">
        <a th:href="@{/index}" class="fl">首页</a>
        <span>/</span>
        <a class="on">商家信息</a>
    </div>
</div>

<!------------------------------Bott------------------------------>
<div class="Bott">
    <div class="wrapper clearfix">
        <div class="you fl" style="width: 275px;">
            <div class="gxin">
                <div class="xx" th:object="${seller}">
                    <div style="height: 80px;background: #eeeeee;">
                        <img th:src="*{avatar}" style="width: 80px;height: 80px;border-radius: 40px;">

                    </div>
                    <h3 class="clearfix">
                        <strong class="fl" th:text="*{userName}">商家资料</strong>
                    </h3>
                    <div>账号：<span th:text="*{loginName}"></span></div>
                    <div>性别：<span th:text="*{sex}" id="userSex"></span></div>
                    <div>手机：<span th:text="*{phonenumber}"></span></div>
                    <div>邮箱：<span th:text="*{email}"></span></div>
                </div>
            </div>
        </div>
        <div class="you fr" style="width: 875px;">
            <div class="my clearfix" style="background: #eeeeee">
                <h3 class="clearfix" >
                    <strong class="fl">公告</strong>
                </h3>
            </div>
            <div style="width: 100%;">
                <table id="bootstrap-table" data-mobile-responsive="true"></table>
            </div>
            <div class="my clearfix" style="background: #eeeeee">
                <h3 class="clearfix" >
                    <strong class="fl">餐饮</strong>
                </h3>
            </div>
            <ul class="proList prefer" id="dataContainer"></ul>
        </div>
    </div>
</div>
<div id="footer" th:include="include::normal_footerDiv"></div>
<div th:include="include::footer_normal"></div>
<script th:src="@{/project/cart.js}"></script>
<script th:inline="javascript">
    var datas = [[${@dict.getType('sys_user_sex')}]];
    $("#sex").val($("#userSex").html());
    $("#userSex").html($($.table.selectDictLabel(datas, $("#userSex").html())).html());


    $(function () {
        queryRecord();
    });
    var _$dataItem = $('<li>' +
        '<a class="a1" href="">' +
        '<dl>' +
        '<dt><img></dt>' +
        '<dd></dd>' +
        '<dd>' +
        '<span class="fl"></span>' +
        // '<a href="javascript:void(0)" title="删除" class="remove fr"><span></span></a>' +
        '</dd>' +
        '</dl>' +
        '</a>' +
        '</li>');
    function queryRecord(){
        $("#dataContainer").paginationInit({
            url:ctx+"index/goodsInfo/listForSeller?userId="+[[${seller.userId}]],
            loadDataItem:function (obj) {
                _$dataItem.find(".a1").attr("href", goodsClickHref(obj.goodsId));
                _$dataItem.find("img").attr("src", obj.imgUrl);
                _$dataItem.find("dd:eq(0)").html(obj.goodsName);
                _$dataItem.find("dd:eq(1) span:eq(0)").html("￥" + obj.goodsPrice);
                // _$dataItem.find(".remove").attr("onclick","removeBrowseRecord("+obj.goodsId+")");
                return _$dataItem[0].outerHTML;
            }
        });
    }


    var types = [[${@dict.getType('sys_notice_type')}]];

    $(function() {
        var options = {
            url: ctx + "index/viewList?userId="+[[${seller.userId}]],
            modalName: "公告",
            search: false,           // 是否显示搜索框功能
            showSearch: false,   // 是否显示检索信息
            showRefresh: false, // 是否显示刷新按钮
            showColumns: false, // 是否显示隐藏某列下拉框
            showToggle: false,   // 是否显示详细视图和列表视图的切换按钮
            showExport: false,
            columns: [
                {
                    field: 'noticeType',
                    title: '类型',
                    align: 'center',
                    formatter: function(value, row, index) {
                        return $.table.selectDictLabel(types, value);
                    },
                    width:"100"
                },
                {
                    field : 'noticeTitle',
                    align : "center",
                    title : '标题',formatter: function(value, row, index) {
                        return "<a class='aclick' href='/index/noticeDetail/"+row.noticeId+"' target='_blank'>"+value+"</a>"
                    },
                    width:"500"
                },
                {
                    field: 'insertTime',
                    title: '创建时间',
                    sortable: true,
                    width:"150"
                }]
        };
        $.table.init(options);
    });
    $(".sList2").css("top","120px");
</script>
</body>
</html>
